package cyou.breathe.blog.knowledgebase.infrastructure.exception;

import cyou.breathe.blog.base.exception.ErrorCode;

/**
 * @author: breathe
 * @createTime: 2025-09-06
 */
public enum KnowledgeBaseErrorCode implements ErrorCode {
    KNOWLEDGE_BASE_NOT_EXIST("KNOWLEDGE_BASE_NOT_EXIST", "知识库不存在"),
    KNOWLEDGE_BASE_NOT_AUTHOR("KNOWLEDGE_BASE_NOT_AUTHOR", "知识库不是作者"),
    KNOWLEDGE_BASE_NOT_PUBLISHED("KNOWLEDGE_BASE_NOT_PUBLISHED", "知识库未发布"),
    KNOWLEDGE_BASE_NOT_DRAFT("KNOWLEDGE_BASE_NOT_DRAFT", "知识库不是草稿"),
    KNOWLEDGE_BASE_NOT_DELETED("KNOWLEDGE_BASE_NOT_DELETED", "知识库未删除"),
    KNOWLEDGE_BASE_CREATE_FAILED("KNOWLEDGE_BASE_CREATE_FAILED", "知识库创建失败"),
    KNOWLEDGE_BASE_GET_FAILED("KNOWLEDGE_BASE_GET_FAILED", "知识库获取失败"),
    KNOWLEDGE_BASE_CREATE_ROOT_FOLDER_FAILED("KNOWLEDGE_BASE_CREATE_ROOT_FOLDER_FAILED", "知识库创建根目录失败"),
    KNOWLEDGE_BASE_DELETE_FOLDER_FAILED("KNOWLEDGE_BASE_DELETE_FOLDER_FAILED", "知识库删除目录失败"),
    KNOWLEDGE_BASE_UPDATE_FOLDER_FAILED("KNOWLEDGE_BASE_UPDATE_FOLDER_FAILED", "知识库更新目录失败"),
    KNOWLEDGE_BASE_UPDATE_FAILED("KNOWLEDGE_BASE_UPDATE_FAILED", "知识库更新失败"),
    KNOWLEDGE_BASE_DELETE_FAILED("KNOWLEDGE_BASE_DELETE_FAILED", "知识库删除失败"),
    ;
    private String code;

    private String message;

    KnowledgeBaseErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
